1. Field of the Invention
This invention relates to the field of buffered systems that process time-stamped information.
2. Background
Many buffered systems receive time stamped information or data. Portions of this data are stored in one or more buffers in the system. The data is consumed from the buffers. Thus, information (data) flows into the buffered system, is consumed at a rate dependent on the time stamp of the data, and the buffers in the buffered system help accumulate and match the presentation rate of the data with the incoming flow rate. The buffered system often consists of multiple components, each of which has buffer capability. The buffer capability of each component is often unknown to other components of the buffered system. Each component generally will stop accepting data from other components when the receiving component""s buffers become full. Although this provides a level of flow-control, it does not provide information about the amount of data that may be buffered at any particular time. Some time-stamped information contains compressed data. This compressed data can be expanded back to its original size and take more buffer space than expected.
The time-stamped information is often used to drive presentation devices (such as audio or video devices) where the data needs to be presented in accordance with the time stamp to provide a smooth presentation and where the time stamp is used to synchronize the audio and video presentations.
One problem, related to presenting time-stamped information when the rate the data is being accepted by the buffered system is less than the rate the data is being consumed from the buffered system, is how best to pause and resume the consumption (presentation) of the information. In the case of video information, displaying each video frame (or small grouping of frames) as the frame is received, has the affect of a series of still pictures instead of a moving image. Thus, some amount of data is initially buffered until a sufficient amount of data is available. At this point the buffered data is consumed until the system becomes starved for additional data. When the system starves, it pauses the consumption of data (pauses the presentation) until the buffered system accumulates enough data to resume consumption.
In the case of time-stamped information, where the amount of data per time-stamped interval can be highly variable (for example, the MPEG format), it is difficult to determine how much of the presentation is present in the buffered system. Thus, it is difficult to determine whether enough information has been received to begin the consumption of the information; difficult to determine when to pause the consumption of the information; and difficult to determine when to resume the consumption of the information.
For time-stamped information, the relevant measure of the amount of data that is buffered is not how much space is taken in the buffers by the data making up the information, but rather the amount of presentation time that exists in the buffers.
It would be advantageous to treat the amount of information in the buffered system not as the amount of space used by the data, or as a percentage of the available buffer space in the buffered system but as an interval of time that represents how much presentation time is buffered in the system. Thus, instead of attempting to monitor buffer usage in the buffered system, determining compressed and uncompressed storage requirements, and making start, pause, and resume decisions based on buffer space, these decisions are more simpler and more efficient when made using the size of the interval of presentation.
One embodiment of the invention accepts time-stamped information and feeds that information to a buffered system that consumes the information. The invention accepts an initial interval of the time-stamped information and when a pre-fill limit is reached, starts consumption of the information. The pre-fill limit is determined by monitoring the time stamp on the information that is ready to be consumed and the time stamp of information that has just been accepted. The difference between these time stamps provides an interval that represents the amount of time related to the buffered data associated with the time-stamped information. Once the interval exceeds a pre-fill limit, the invention allows the buffered time-stamped information to be consumed. As the time-stamped information is consumed, the invention monitors the interval (other embodiments use the time stamp of data that is in the process of being consumed, or data that has just been consumed). If the interval falls below a lower limit, the invention stops consumption of the time-stamped information and waits for the interval to exceed a resume consumption trigger. Once the interval reaches the resume consumption limit the invention resumes consumption of the time-stamped information. This process continues until all the time-stamped information is consumed.
One aspect of the invention is a method that includes the step of monitoring an interval that represents the amount of time-stamped information stored within a buffered system. The method also includes steps of adding the time-stamped information to the buffered system and of consuming the time-stamped information from the buffered system. In addition the method detects when the interval is less than a lower limit and, in that case, stops consumption of the time-stamped information from the buffered system. The method also detects when the interval has reached a resume consumption trigger and accordingly resumes consumption of the time-stamped information from the buffered system.
Another aspect of the invention is an apparatus that includes an interval monitoring mechanism that is configured to monitor an interval representing the amount of time-stamped information stored within a buffered system. The apparatus also includes a receiver mechanism that is configured to add the time-stamped information to the buffered system and a data processing mechanism configured to consume the time-stamped information from the buffered system. The apparatus uses a low limit detection mechanism to detect when the interval is less than a lower limit and a pause mechanism configured to stop consumption of the time-stamped information from the buffered system responsive to the low limit detection mechanism. When the consumption is stopped, a resume detection mechanism detects when the interval has reached a resume consumption trigger. The apparatus also includes a resumption mechanism that resumes consumption of the time-stamped information from the buffered system responsive to the resume detection mechanism.
Yet a further aspect of the invention is a computer program product embodied in a computer usable medium. When executed on a computer, the computer readable code causes a computer to effect an interval monitoring mechanism, a receiver mechanism, a data processing mechanism, a low limit detection mechanism, a pause mechanism, a resume detection mechanism, and a resumption mechanism. Each of these mechanisms having substantially the same functions as the corresponding mechanisms for the previously described apparatus.